import request from '@/utils/request'

// 查询用户核心指标
export function getUserMetrics(query) {
  return request({
    url: '/statistics/userAnalyse/metrics',
    method: 'get',
    params: query
  })
}

// 查询用户活跃度趋势
export function getUserActivityTrend(query) {
  return request({
    url: '/statistics/userAnalyse/activityTrend',
    method: 'get',
    params: query
  })
}

// 查询用户地域分布
export function getUserRegionDistribution(query) {
  return request({
    url: '/statistics/userAnalyse/regionDistribution',
    method: 'get',
    params: query
  })
}

// 查询用户转化漏斗
export function getUserConversionFunnel(query) {
  return request({
    url: '/statistics/userAnalyse/conversionFunnel',
    method: 'get',
    params: query
  })
}

// 查询用户详情列表
export function getUserDetails(query) {
  return request({
    url: '/statistics/userAnalyse/details',
    method: 'get',
    params: query
  })
}

// 导出用户分析数据
export function exportUserData(query) {
  return request({
    url: '/statistics/userAnalyse/export',
    method: 'post',
    params: query
  })
}
